
package com.phevos.usercenter.client;

import java.util.HashMap;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.phevos.usercenter.client.service.Function;

public class ComputeThread extends Thread
{
    private static Logger logger = LoggerFactory.getLogger(ComputeThread.class.getName());

    public void run()
    {
        while (true)
        {
            try
            {
                // Date date = new Date();
                // long start = date.getTime();
                HashMap objMap = Function.computeObjFunction();
                // Date date2 = new Date();
                // long end = date2.getTime();
                // System.out.println("time is "+(end-start));
                Function.setUserObjMap(objMap);
                Thread.sleep(60 * 1000);
            }
            catch (InterruptedException e)
            {
                logger.error("UserObjFunction compute error " ,e);
            }
        }
    }
}
